package com.nlgc365.designpattern.Chapter04_Pattern.Behavior.P01_Observer.AsynchObserver;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 单例的ThreadPool
 */
public class ThreadPoolUtils {
    private static final int THREADS_AMOUNT = 10;
    private static volatile ExecutorService executorService = Executors.newFixedThreadPool(THREADS_AMOUNT);

    public static ExecutorService getThreadPool() {
        return executorService;
    }
}
